

module.exports = function newDate() {
    let date = new Date()
    let year = date.getFullYear()
    let month = date.getMonth() + 1
    let day = date.getDate()
    let hour = date.getHours()
    let min = date.getMinutes()
    let second = date.getSeconds()
    let miniSecond = date.getMilliseconds()
    month = month>=10?month:'0'+month
    day = day>=10?day:'0'+day
    hour = hour>=10?hour:'0'+hour
    min = min>=10?min:'0'+min
    second = second>=10?second:'0'+second
    miniSecond = miniSecond>=10? miniSecond>=100?miniSecond:'0'+miniSecond:'00'+miniSecond
    return {
        year,   //年
        month,  //月
        day,    //日
        hour,   //小时
        min,    //分钟
        second, //秒
        miniSecond, //毫秒
    }
}

